﻿using static System.Console;



Title = "C#中List集合的FindAll方法以及条件过滤";
List<int> ints = new List<int>()
{
    1,2,3,445,555,56,6,77,7,8
};

List<int> res = ints.FindAll(FilterNum);
foreach (var item in res)
{
    WriteLine(item);
}


ints.ForEach(FilterForeach);



static bool FilterNum(int num)
{
    return num > 50;
}


static void FilterForeach(int num)
{
    num += 5;
    WriteLine(num);
}

ReadKey();